struct Generic_Class:indirect /* in C++ omit ':indirect' */
{
int init(void); /* in C++ use 'virtual int init(void)' */
int destroy(void); /* in C++ use 'virtual int destroy(void)' */
};
int Generic_Class::init(void)
{
return 1;
}
int Generic_Class::destroy(void)
{
return 1;
}
The init() and destroy() methods will thus be inherited by all classes, although they will likely be overridden frequently. Their use will be discussed in the next section.